cmake_minimum_required(VERSION 3.1)
project(FPStyleTests)

set(CMAKE_CXX_STANDARD 11)

enable_testing()

include_directories(.)
add_library(test_comm test_comm.cpp)
target_link_libraries(test_comm gtest)

function(TestGen BIN_NAME SRC_NAME OTHER_LINK)
    message("\nbin_name : ${BIN_NAME}")
    message("src_name : ${SRC_NAME}\n")
    add_executable(${BIN_NAME} ${SRC_NAME})
    target_link_libraries(${BIN_NAME} gtest_main test_comm ${OTHER_LINK})
endfunction()

TestGen(condition_if_test condition_if_test.cpp FPStyle)
TestGen(loop_test loop_test.cpp FPStyle)